package com.techstar.ats.dxp.history;

import java.time.LocalDateTime;

import com.techstar.ats.dxp.CsvFormatter;
import com.techstar.ats.type.AlarmType;
import com.techstar.ats.type.SiteType;

public class F20Alarm implements CsvFormatter {
	private static final long serialVersionUID = 1L;
	public SiteType siteType;
	public int site;
	public String name;
	public LocalDateTime occTime;
	public AlarmType type;
	public int subType;
	public String desc;
	public int ackSiteCode;
	public String ackSiteName;
	public String ackUserName;
	public LocalDateTime ackTime;

	public boolean toCsvString(StringBuffer sb) {
		sb.append(this.siteType)
			.append(',')
			.append(this.site)
			.append(',')
			.append(this.name)
			.append(',')
			.append(this.occTime.format(DATE_TIME_FORMATTER))
			.append(',')
			.append(this.type)
			.append(',')
			.append(this.subType)
			.append(',')
			.append(this.desc)
			.append(',')
			.append(this.ackSiteCode)
			.append(',')
			.append(this.ackSiteName)
			.append(',')
			.append(this.ackUserName)
			.append(',')
			.append(this.ackTime.format(DATE_TIME_FORMATTER));
		return true;
	}
}
